<?php

class Globals {
	private $phpErrorHandler;
	private $moduleManager;
	private $pathReference;

	private $loggerManager;
	private $logHandlerManager;
	private $loggerFactory;
	private $cache;

	public function __construct ($errhandler, $mm, $pathReference) {
		$this->phpErrorHandler = $errhandler;
		$this->moduleManager = $mm;
		$this->pathReference = $pathReference;

		$this->loggerManager = new \Log\LoggerManager;
		$this->logHandlerManager = new \Log\LogHandlerManager;
		$this->loggerFactory = new \Log\LoggerFactory($this);
		$this->cache = new \Cache\Cache($this);
	}

	public function getPhpErrorHandler () {
		return $this->phpErrorHandler;
	}

	public function getLoggerManager () {
		return $this->loggerManager;
	}

	public function getLogHandlerManager () {
		return $this->logHandlerManager;
	}

	public function getModuleManager () {
		return $this->moduleManager;
	}

	public function getLoggerFactory () {
		return $this->loggerFactory;
	}

	public function getPathReference () {
		return $this->pathReference;
	}

	public function getCache () {
		return $this->cache;
	}
}
